﻿// /////////////////////////////////////////////////////////////////////
// 
//  Codeplex JSAnalyse
//  Copyright (c) 2011
//  JSAnalyse.Core   DependencyInfo.cs
// 
// /////////////////////////////////////////////////////////////////////

namespace JSAnalyse.Core
{
    /// <summary>
    /// Information container for dependencies
    /// </summary>
    public class DependencyInfo
    {
        #region Public properties

        /// <summary>
        /// Gets or sets the file.
        /// </summary>
        /// <value>The file.</value>
        public string File { get; set; }

        /// <summary>
        /// Gets or sets the dependency location.
        /// </summary>
        /// <value>The dependency location.</value>
        public SourceLineLocation DependencySourceLocation { get; set; }

        #endregion

        #region Constructor

        /// <summary>
        /// Initializes a new instance of the <see cref="DependencyInfo"/> class.
        /// </summary>
        /// <param name="file">The file.</param>
        /// <param name="line">The line number within file</param>
        /// <param name="character">The position of character within file</param>
        public DependencyInfo(string file, int line, int character)
        {
            DependencySourceLocation = new SourceLineLocation { Line = line, Character = character };
            File = file;
        }

        #endregion
    }
}
